<?php if ($pager['numpages'] > 1): ?>
	<?php if ($pager['showingtag']):
		$url = Gene::makeLink($pager['object'])."/view/tag/".str_replace(' ', '_', $pager['showingtag']);
	else:
		$url = Gene::makeLink($pager['object']);
	endif;
	?>
			
	<div class="paging">
	<?php if ($pager['location'] == 'top'): ?>
		<div class="pagerinfo top">Currently showing page <?php echo $pager['currentpage'] ?> of <?php echo $pager['numpages'] ?></div>
	<?php endif; ?>
	
	<div class="pager">
	
	<?php foreach ($pager['showpages'] as $i): ?>
		<?php if ($i-$last > 1): ?>
			<span class="mindthebiggap">...</span>
		<?php endif; ?>
		
		<?php $last = $i ?>
		
		<?php if ($i == $pager['currentpage']): ?>
			<span class="currentpage"><?php echo $i ?></span>
		<?php else: ?>
			<span><a href="<?php if ($pager['section']): 
				echo addArguments($url, array_merge($pager['arguments'], array('section' => $i)));
			else:
				echo addArguments($url, array_merge($pager['arguments'], array('page' => $i)));
			endif; 
			
			if ($pager['anchor']): ?>
				#<?php _e($pager['anchor']) ?>
			<?php endif; ?>"><?php echo $i ?></a></span>
		<?php endif; ?>
	<?php endforeach; ?>
	
	</div>
	
	<?php if ($pager['location'] != 'top'): ?>
		<div class="pagerinfo bottom">Currently showing page <?php echo $pager['currentpage'] ?> of <?php echo $pager['numpages'] ?></div>
	<?php endif; ?>
	</div>
<?php endif; ?>